home *** CD-ROM | disk | FTP | other *** search
/ Aminet 49 / Aminet 49 (2002)(GTI - Schatztruhe)[!][Jun 2002].iso / Aminet / dev / misc / FlexCat.lha / Lib / CatComp_h.sd < prev    next >
Text File  |  1999-11-28  |  3KB  |  156 lines

  1. ##rem $Id: CatComp_h.sd,v 1.2 1999/11/28 03:36:41 carlos Exp $
  2. ##stringtype C
  3. ##shortstrings
  4.  
  5. #ifndef %b_STRINGS_H
  6. #define %b_STRINGS_H
  7.  
  8. /****************************************************************
  9.  
  10.    This file was created automatically by `%fv'
  11.    from "%f0"
  12.  
  13.    using CatComp.sd 1.2 (24.09.1999)
  14.  
  15.    Do NOT edit by hand!
  16.  
  17. ****************************************************************/
  18.  
  19. #ifndef EXEC_TYPES_H
  20. #include <exec/types.h>
  21. #endif
  22.  
  23. #ifdef  %b_BASIC_CODE
  24. #undef  %b_BASIC
  25. #undef  %b_CODE
  26. #define %b_BASIC
  27. #define %b_CODE
  28. #endif
  29.  
  30. #ifdef  %b_BASIC
  31. #undef  %b_ARRAY
  32. #undef  %b_BLOCK
  33. #define %b_ARRAY
  34. #define %b_BLOCK
  35. #endif
  36.  
  37. #ifdef  %b_ARRAY
  38. #undef  %b_NUMBERS
  39. #undef  %b_STRINGS
  40. #define %b_NUMBERS
  41. #define %b_STRINGS
  42. #endif
  43.  
  44. #ifdef  %b_BLOCK
  45. #undef  %b_STRINGS
  46. #define %b_STRINGS
  47. #endif
  48.  
  49.  
  50. #ifdef %b_CODE
  51. #include <proto/locale.h>
  52. extern struct Library *LocaleBase;
  53. #endif
  54.  
  55. #ifdef %b_NUMBERS
  56.  
  57. #define %i %d
  58.  
  59. #endif /* %b_NUMBERS */
  60.  
  61.  
  62. /****************************************************************************/
  63.  
  64.  
  65. #ifdef %b_STRINGS
  66.  
  67. #define %i_STR %s
  68.  
  69. #endif /* %b_STRINGS */
  70.  
  71.  
  72. /****************************************************************************/
  73.  
  74.  
  75. #ifdef %b_ARRAY
  76.  
  77. struct %b_ArrayType
  78. {
  79.     LONG   cca_ID;
  80.     STRPTR cca_Str;
  81. };
  82.  
  83. static const struct %b_ArrayType %b_Array[] =
  84. {
  85.     { %i, (STRPTR)%i_STR },
  86. };
  87.  
  88.  
  89. #endif /* %b_ARRAY */
  90.  
  91.  
  92. /****************************************************************************/
  93.  
  94.  
  95. #ifdef %b_BLOCK
  96.  
  97. static const char %b_Block[] =
  98. {
  99.  
  100.      "%4a" "%2t"\n    %i_STR "%z"
  101.  
  102. };
  103.  
  104. #endif /* %b_BLOCK */
  105.  
  106.  
  107. /****************************************************************************/
  108.  
  109.  
  110. #ifdef %b_CODE
  111.  
  112. #ifndef %b_CODE_EXISTS
  113.  #define %b_CODE_EXISTS
  114.  
  115.  STRPTR Get%bString(struct %b_LocaleInfo *li, LONG stringNum)
  116.  {
  117.  LONG   *l;
  118.  UWORD  *w;
  119.  STRPTR  builtIn;
  120.  
  121.      l = (LONG *)%b_Block;
  122.  
  123.      while (*l != stringNum)
  124.        {
  125.        w = (UWORD *)((ULONG)l + 4);
  126.        l = (LONG *)((ULONG)l + (ULONG)*w + 6);
  127.        }
  128.      builtIn = (STRPTR)((ULONG)l + 6);
  129.  
  130. // #define %b_XLocaleBase LocaleBase
  131. // #define LocaleBase li->li_LocaleBase
  132.     
  133.      if(LocaleBase && li)
  134.         return(GetCatalogStr(li->li_Catalog, stringNum, builtIn));
  135.  
  136. // #undef  LocaleBase
  137. // #define LocaleBase XLocaleBase
  138. // #undef  %b_XLocaleBase
  139.  
  140.      return(builtIn);
  141.  }
  142.  
  143. #else
  144.  
  145.  STRPTR Get%bString(struct %b_LocaleInfo *li, LONG stringNum);
  146.  
  147. #endif /* %b_CODE_EXISTS */
  148.  
  149. #endif /* %b_CODE */
  150.  
  151.  
  152. /****************************************************************************/
  153.  
  154.  
  155. #endif /* %b_STRINGS_H */
  156.